import Vue from 'vue'
import App from './App.vue'
import router from './router'
import "./assets/css/global.css" //添加全局样式 
import './assets/font/iconfont.css' //引入icon图标
import './assets/font/iconfont.js' //引入svg图标

Vue.prototype.$echarts = echarts //构造全局实例
Vue.prototype.$http = axios //创建挂载axios实例
Vue.config.productionTip = false

//配置全局axios实例
axios.defaults.baseURL = "http://localhost:9000" //设置访问根路径,设置默认的访问路径
axios.defaults.timeout = 9000 //设置超时时间，如果请求花费超过timeout时间则中断请求

//按需导入组件，优化项目的大小05.11
import {
	Radio,
	RadioGroup,
	RadioButton,
	MessageBox,
	Message,
	Collapse,
	CollapseItem,
	Dropdown,
	DropdownMenu,
	DatePicker,
	DropdownItem,
	Pagination,
	Dialog,
	Menu,
	Submenu,
	MenuItem,
	MenuItemGroup,
	Input,
	Checkbox,
	CheckboxButton,
	CheckboxGroup,
	Switch,
	Select,
	Option,
	Button,
	ButtonGroup,
	Table,
	TableColumn,
	Tooltip,
	Breadcrumb,
	BreadcrumbItem,
	Form,
	FormItem,
	Tabs,
	TabPane,
	Tag,
	Tree,
	Alert,
	Icon,
	Row,
	Col,
	Upload,
	Progress,
	Spinner,
	Badge,
	Card,
	Rate,
	Steps,
	Step,
	Carousel,
	CarouselItem,
	Container,
	Header,
	Aside,
	Main,
	Footer,
	Timeline,
	TimelineItem,
	Link,
	Divider,
	Image,
	Loading
} from 'element-ui';
Vue.use(Loading)
Vue.use(Pagination)
Vue.use(Dialog)
Vue.use(Menu)
Vue.use(Submenu)
Vue.use(MenuItem)
Vue.use(MenuItemGroup)
Vue.use(Input)
Vue.use(Checkbox)
Vue.use(CheckboxButton)
Vue.use(CheckboxGroup)
Vue.use(Switch)
Vue.use(Select)
Vue.use(Option)
Vue.use(Button)
Vue.use(ButtonGroup)
Vue.use(Radio)
Vue.use(RadioGroup)
Vue.use(RadioButton)
Vue.use(Table)
Vue.use(TableColumn)
Vue.use(Tooltip)
Vue.use(Breadcrumb)
Vue.use(BreadcrumbItem)
Vue.use(Form)
Vue.use(FormItem)
Vue.use(Tabs)
Vue.use(TabPane)
Vue.use(Tag)
Vue.use(Tree)
Vue.use(Alert)
Vue.use(Icon)
Vue.use(Row)
Vue.use(Col)
Vue.use(Upload)
Vue.use(Progress)
Vue.use(Spinner)
Vue.use(Badge)
Vue.use(Card)
Vue.use(Rate)
Vue.use(Steps)
Vue.use(Step)
Vue.use(Carousel)
Vue.use(CarouselItem)
Vue.use(Container)
Vue.use(Header)
Vue.use(Aside)
Vue.use(Main)
Vue.use(Footer)
Vue.use(Timeline)
Vue.use(TimelineItem)
Vue.use(Link)
Vue.use(Divider)
Vue.use(Image)
Vue.use(Dropdown)
Vue.use(DropdownMenu)
Vue.use(DropdownItem)
Vue.use(DatePicker)
Vue.use(Collapse)
Vue.use(CollapseItem)
Vue.use(Message)
Vue.prototype.$message = Message
Vue.prototype.$confirm = MessageBox.confirm
Vue.prototype.$alert = MessageBox.alert



//实例化一个vue对象，挂载到#app上
new Vue({
	router,
	render: h => h(App)
}).$mount('#app')
